package lotto;

import org.apache.commons.math3.stat.regression.SimpleRegression;

//http://commons.apache.org/proper/commons-math/userguide/stat.html#a1.4_Simple_regression
//http://www.roguewave.com/products/imsl-numerical-libraries/java-library.aspx
public class regression {
	
	
  public static void main(String [] args){
	  SimpleRegression regression = new SimpleRegression();
	  regression.addData(1, 0.1);
	  // At this point, with only one observation,
	  // all regression statistics will return NaN

	  regression.addData(2, 0.001);
	  // With only two observations,
	  // slope and intercept can be computed
	  // but inference statistics will return NaN

	  regression.addData(3, 0.2);
	  // Now all statistics are defined.
	  
	  
	  regression.addData(4, 0.3);
	 
	
	   System.out.println(regression.predict(5));
			


	  
  }
}
